#pragma once
#include "Runtime/BattleFirePrefix.h"
#include "MaterialInterface.h"
#include "Runtime/Rendering/RenderingPrefix.h"
#include "Runtime/Rendering/Shader.h"

namespace Alice
{
    class DefaultMaterialInstance;
    class MaterialSharedResource;
    class Material:public MaterialInterface
    {
    public:
        DefaultMaterialInstance* mDefaultMaterialInstance;
        std::vector<MaterialSharedResource*> mMaterialSharedResources;
        ShaderPipeline* mShaderPipelines[EMeshPass::Num];
        Material();
        void SetShader(EMeshPass::Type inMeshPass,EShaderFrequency inShaderFrequency,Shader*inShader);
        void CacheResourceShadersForRendering();
        /** Caches shader maps for an array of material resources. */
        void CacheShadersForResources(std::vector<MaterialSharedResource*>& inResourcesToCache);
    };
}
